'use strict';

var Router = require('koa-router');
var ctrl = require('./base.controller');

var baseRouter = function baseRouter(app) {
  var router = new Router({
    prefix: '/v1/bases'
  });

  app
    .use(router.routes())
    .use(router.allowedMethods());

  router.get('/', ctrl.list)
    .get('/:id', ctrl.get)
    .get('/test', ctrl.add);

};

module.exports = baseRouter;
